﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="user_list.aspx.cs" Inherits="admin_user_user_list" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理员列表</title>
    <link type="text/css" rel="stylesheet" href="../scripts/ui/skins/Aqua/css/ligerui-all.css" />
    <link type="text/css" rel="stylesheet" href="../images/style.css" />
    <link type="text/css" rel="stylesheet" href="../css/pagination.css" />
    <link type="text/css" rel="stylesheet" href="../select/skins/style.css"  />
    <script type="text/javascript" src="../scripts/jquery/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../scripts/ui/js/ligerBuild.min.js"></script>
    <script type="text/javascript" src="../js/function.js"></script>   
    <script type="text/javascript" src="../select/js/select_split.js"></script>
    <script type="text/javascript">
        $(function () {
            //显示关闭高级选项
            $("#upordown").toggle(function () {
                $(this).text("关闭搜索条件");
                $(this).removeClass();
                $(this).addClass("up-01");
                $(".upordown").show();
            }, function () {
                $(this).text("显示搜索条件");
                $(this).removeClass();
                $(this).addClass("up-02");
                $(".upordown").hide();
            });
        });
    </script>    
    <script type="text/javascript">
      //局部刷新重新加载表格css
      $(document).ready(function () {
          SetRowClass();
          ReloadJs();
      })      
    </script>
</head>
<body class="mainbody">
    <form id="form1" runat="server"> 
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>   
    <div class="navigation"><span id="upordown" class="up-02">显示查询条件</span>首页 &gt; 系统信息管理 &gt; 用户管理 </div> 
    <div class="tools_box"><div class="upordown hide">  
     <div class="select_box">查询条件：                     
            用户编号：<asp:TextBox ID="txtUserID" CssClass="txtInput" runat="server"></asp:TextBox>&nbsp;
            角色名称：<%--<asp:DropDownList ID="ddlRoleName" runat="server" CssClass="select2"></asp:DropDownList>--%>
                      <select runat="server" id="selRoleName" autowidth="true"></select>&nbsp; 
            用户姓名：<asp:TextBox ID="txtUserName" CssClass="txtInput" runat="server"></asp:TextBox>&nbsp;
            部门名称：<%--<asp:DropDownList ID="ddlBranch" runat="server" CssClass="select2"></asp:DropDownList>--%> 
                      <select runat="server" id="selBranch" name="sel2"  autowidth="true" ></select>&nbsp;
            状态：   <%-- <asp:DropDownList ID="ddlLock" runat="server" CssClass="select2">
                        <asp:ListItem Selected="False">是否禁用...</asp:ListItem>
                        <asp:ListItem>正常</asp:ListItem>
                        <asp:ListItem>禁用</asp:ListItem>
                      </asp:DropDownList>--%>
                        <select runat="server" id="selLock" autowidth="true">
                            <option value="" selected="selected">是否禁用...</option>
                            <option value="正常">正常</option>
                            <option value="禁用">禁用</option>
                       </select>   
      </div>
      </div>  
        <div class="tools_bar">
            <%-- <div class="search_box">
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="btnSearch"  />
            </div>--%>
            <a href="user_edit.aspx?action=<%#ActionEnum.Add %>" class="tools_btn"><span><b class="add">添加用户</b></span></a> 
           <%-- <a href="role_list.aspx" class="tools_btn"><span><b class="return">角色管理</b></span></a> --%>
            <a href="javascript:void(0);" onclick="checkAll(this);" class="tools_btn"><span><b class="all">全选</b></span></a>
            <asp:LinkButton ID="btnDelete" runat="server" CssClass="tools_btn" OnClientClick="return ExePostBack('btnDelete','删除用户后不可恢复，您确定吗？');"
                OnClick="btnDelete_Click"><span><b class="delete">批量删除</b></span></asp:LinkButton>        
            <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="tools_btn" OnClick="lbtnSearch_Click"><span><b class="search">高级查询</b></span></asp:LinkButton>
            <asp:LinkButton ID="lbtnReset" runat="server" CssClass="tools_btn" OnClick="lbtnReset_Click"><span><b class="recover">重置条件</b></span></asp:LinkButton>
        </div> 
    </div>
    <!--列表展示.开始-->
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
    <asp:Repeater ID="rptList" runat="server">
        <HeaderTemplate>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
                <tr>
                    <th width="6%">选择</th>
                    <th width="10%" align="left">用户编号</th>
                    <th width="12%" align="left">角色</th>
                    <th width="12%" align="left">姓名</th>
                    <th width="12%" align="left">部门</th>
                    <th width="12%" align="left">联系电话</th>
                    <th width="12%" align="left">邮箱</th>
                    <th width="12%" align="left">添加时间</th>
                    <th width="6%">是否启用</th>
                    <th width="6%">操作</th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align="center">
                    <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" /><asp:HiddenField ID="hidId"
                     Value='<%#Eval("id")%>' runat="server" />
                </td>
                <td><a href="user_edit.aspx?action=<%#ActionEnum.Edit %>&id=<%#Eval("id")%>"><%#Eval("user_id")%></a></td>
                <td><%#Eval("role_name")%></td>
               <%--  <td ><%#GetTitle(Convert.ToInt32(Eval("role_id")))%></td>--%>
                <td><%#Eval("user_name")%></td>
                <td><%#new fcwms.BLL.dt_branch().GetTitle(Convert.ToInt32(Eval("branch_id")))%></td>
                <td><%#Eval("telephone")%></td>
                <td><%#Eval("email")%></td>
                <td><%#string.Format("{0:yyyy-MM-dd HH:mm}", Eval("add_time"))%></td>
                <td align="center">
                    <%#Eval("is_lock").ToString().Trim() == "0" ? "<img title=\"正常\" src=\"../images/icon_correct.png\" />" :"<img title=\"禁用\" src=\"../images/icon_disable.png\" />"%>
                </td>
                <td align="center"><a href="user_edit.aspx?action=<%#ActionEnum.Edit %>&id=<%#Eval("id")%>">修改</a></td>
                <%--<td><%#new fcwms.Web.user_role().GetTitle(Convert.ToInt32(Eval("role_id")))%></td>--%>
                <%--  <td><%#Eval("user_id")%></td>--%>
                <%--   <td><%#string.Format("{0:g}",Eval("add_time"))%></td>--%>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"10\">暂无记录</td></tr>" : ""%>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    
    <!--列表展示.结束-->
    <div class="line15"></div>   
    <div class="page_box">
        <div id="PageContent" runat="server" class="flickr right"></div>
        <div class="left"><%--显示
            <asp:DropDownList ID="ddlNum" runat="server" CssClass="select2" AutoPostBack="True"
                OnSelectedIndexChanged="ddlNum_SelectedIndexChanged1">
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
                <asp:ListItem>50</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>1</asp:ListItem>
            </asp:DropDownList>&nbsp;条/页--%>
            
             显示 <asp:Button ID="btn10" runat="server" Text="10" CssClass="btnnum" onclick="btn10_Click"   />
             <asp:Button ID="btn20" runat="server" Text="20" CssClass="btnnum" onclick="btn20_Click"   />
             <asp:Button ID="btn50" runat="server" Text="50" CssClass="btnnum" onclick="btn50_Click"   />条/页&nbsp;
            共<asp:Label ID="lblCount" runat="server" Text=""></asp:Label>条记录
            <%-- <asp:TextBox ID="txtPageNum" runat="server" CssClass="txtInput2 small2" AutoPostBack="True"
                OnTextChanged="txtPageNum_TextChanged" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" >10</asp:TextBox>
            <asp:RegularExpressionValidator ID="revEnterNum" runat="server" ControlToValidate="txtPageNum"
                Display="Dynamic" ErrorMessage="请输入数字！" ValidationExpression="^([1-9][0-9]*)$"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="rfvNotEmpty" runat="server" ControlToValidate="txtPageNum"
                Display="Dynamic" ErrorMessage="不能为空，请输入数字！"></asp:RequiredFieldValidator>--%>
        </div>
        <webdiyer:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
            runat="server" HorizontalAlign="Right" PageSize="10" OnPageChanged="AspNetPager1_PageChanged"
            NumericButtonCount="8" CurrentPageButtonPosition="Center" ShowDisabledButtons="false" 
            AlwaysShowFirstLastPageNumber="true"  ShowFirstLast="False"
            NextPageText="&nbsp;&nbsp;&nbsp;下一页&nbsp;&nbsp;&nbsp;" PrevPageText="&nbsp;&nbsp;&nbsp;上一页&nbsp;&nbsp;&nbsp;">
        </webdiyer:AspNetPager>      
    </div>
     </ContentTemplate></asp:UpdatePanel>
    <div class="line10"></div>
    </form>
</body>
</html>
